﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace OL.FrameCore.WebUI.ViewModels.Dept
{
    public class PostAddOrUpdateDeptViewRequest
    {
        public int? Id { get; set; }

        [Required(ErrorMessage = "部门名称不能为空")]
        [StringLength(20, ErrorMessage = "部门名称不能超过20个字符")]
        
        public string DeptName { get; set; }

        [Required(ErrorMessage = "部门编号不能为空")]
        [StringLength(20, ErrorMessage = "部门编号不能超过20个字符")]
        public string DeptCode { get; set; }

        [Required(ErrorMessage = "父级部门不能为空")]
        public int ParentId { get; set; }
        public int SortIndex { get; set; }

        [StringLength(200, ErrorMessage = "备注长度不能超过200个字符")]
        public string Remark { get; set; } = "";
    }
}
